package com.qf.service.impl;

import com.qf.entity.User;
import com.qf.entity.UserDTO;
import com.qf.mapper.UserMapper;
import com.qf.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * ------回首昨日,更进一步------
 *
 * @author JinXiaoChen
 * @date 2025/4/27
 * @desc
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public List<User> findAll() {
        return userMapper.findAll();
    }

    @Override
    public boolean addUser(User user) {
        return userMapper.addUser(user);
    }

    @Override
    public boolean deleteUser(Integer id) {
        return userMapper.deleteUser(id);
    }

    @Override
    public boolean updateUser(User user) {
        return userMapper.updateUser(user);
    }

    @Override
    public boolean deleteUserBatch(List<Integer> ids) {
        return userMapper.deleteUserBatch(ids);
    }

    @Override
    public List<User> findPage(UserDTO userDto) {
        return userMapper.findPage(userDto);
    }
}
